<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s"  uri="/struts-tags"%>

<s:if test='FLAG=="DO"'>
<title>待处理还款列表</title><span id="navlink">贷后管理   >> 还款管理  >> 待处理还款</span>
</s:if>
<s:elseif test='FLAG=="AHEAD"'>
<title>待处理提前还款列表</title><span id="navlink">贷后管理   >> 还款管理  >> 提前还款</span>
</s:elseif>

<table class="table_box table_bottom_border" cellspacing="0" cellpadding="0">
	<tr>
		<th>合同编号</th>
		<th>借款人名称</th>
		<th>放款序号</th>
		<th>借款日期</th>
		<th>借款金额</th>
		<th>实收金额</th>
		<th>待核实金额</th>
		<th>余额</th>
		<th style="width:200px">操作</th>
	</tr>
<s:iterator value="contractList" status="index" var="var">
<s:if test="backmoney!=grantmoney">
	<tr>
		<td align="center">${contractId}</td>
		<td align="center">${customname}</td>
		<td align="center">${grantnum}</td>
		<td align="center"><s:text name="f.date.ymdc"><s:param value="grantdate"/></s:text></td>
		<td align="right"><s:text name="f.money"><s:param value="grantmoney"/></s:text></td>
		<td align="right"><s:text name="f.money"><s:param value="backmoney"/></s:text></td>
		<td align="right"><s:text name="f.money"><s:param value="waitmoney"/></s:text></td>
		<td align="right"><s:text name="f.money"><s:param value="balance"/></s:text></td>
		<td align="center" id="${id}">
		<s:if test="balance>0">
			<s:if test='FLAG=="DO"'>
				<input type="button" class="printChange" value="生成凭证" />
			</s:if>
			<s:elseif test='FLAG=="AHEAD"'>
				<input type="button" class="printChangeAhead" value="生成凭证" />
			</s:elseif>
		</s:if>
		</td>
	</tr>
</s:if>
</s:iterator>
</table>
<div id="button_area"><div class="pagebar"></div></div>

<script type="text/javascript">

$(".printChange").click(function(){
	$thisid=$(this).parent("td").attr("id");
	OpenDialog(750,450,"修改","creditPrint!printIn?type=change&id="+$thisid);
});
$(".printChangeAhead").click(function(){
	$thisid=$(this).parent("td").attr("id");
	OpenDialog(750,450,"修改","creditPrint!printIn?type=changeahead&id="+$thisid);
});
$(".printdone").click(function(){
	$thisid=$(this).parent("td").attr("id");
	MessageDialog("./creditIn!printSure?id="+$thisid,"确认打印完成？","");
});

</script>